
import axios from 'axios'

import {base} from './zxy_api'

// restaurants SEARCH
export const searchResList = (params) => { return axios.get(`${base}/admin/restaurant/query-list` , {params}) }
// restaurants NEW FORM
export const uploadFormInfo = (params, config) => { return axios.post(`${base}/admin/restaurant/save`, params, config) }
// upload restaurant`s photos
export const uploadRestaurantPhotos = (params, config) => { return axios.post(`${base}/admin/restaurant/photos`, params, config) }
export const uploadRestaurantCoverLogo = (params, config) => { return axios.post(`${base}/admin/restaurant/logo`, params, config) }
//restaurant 编辑
export const initRestaurant = (params) => { return axios.get(`${base}/admin/restaurant/detail/` + params) }
//restaurant Activity 详情
export const getActivityInfo = (params) => { return axios.get(`${base}/admin/restaurant-activity/find-with-restaurant/?` + params) }
// discount SEARCH
export const searchDiscount = (params) => { return axios.get(`${base}/admin/restaurant/discount?` + params) }
// discount NEW FORM
export const uploadDiscountForm = (params, config) => { return axios.post(`${base}/admin/restaurant/discount`, params, config) }
// discount Delete
export const changeStatus = (params, config) => { return axios.post(`${base}/admin/restaurant/discount/update`, params, config) }
// block booking SEARCH
export const searchBlockBooking = (params) => { return axios.get(`${base}/admin/restaurant/block?` + params) }
// block booking NEW FORM
export const uploadBlockBookingForm = (params, config) => { return axios.post(`${base}/admin/restaurant/block`, params, config) }
// block booking Delete
export const changeBlockStatus = (params, config) => { return axios.post(`${base}/admin/restaurant/block/delete`, params, config) }
// Bus Line NEW FORM
export const uploadNewBusFormInfo = (params, config) => { return axios.post(`${base}/admin/busLine/save`, params, config) }
// Bus Line SEARCH
export const searchBusLineList = (params) => { return axios.get(`${base}/admin/busLine/query-list` , {params}) }
// Bus Line 编辑
export const initBusLine = (params) => { return axios.get(`${base}/admin/busLine/detail/` + params) }
// Bus Stop NEW FORM
export const uploadNewBusStopFormInfo = (params, config) => { return axios.post(`${base}/admin/busStop/save`, params, config) }
// Bus Stop 编辑
export const initBusStopLine = (params) => { return axios.get(`${base}/admin/busStop/detail/` + params) }
// feedback List
export const searchFeedbackList = (params) => { return axios.get(`${base}/admin/feedback/query-list` , {params}) }
// feedback Init
export const initFeedback = (params) => { return axios.get(`${base}/admin/feedback/detail/` + params) }
// feedback 编辑
export const uploadFeedbackFormInfo = (params, config) => { return axios.post(`${base}/admin/feedback/save`, params, config) }

// Google LOGIN
export const loginWithGoogle = params => { return axios.post(`${base}/app/user/login/google`, params) }
// 退出登录
export const signOutUser = params => { return axios.post(`${base}/app/user/sign-out`, params) }

// train station 列表接口
export const trainStationList = params => { return axios.get(`${base}/admin/train/station/query-list`, {params}) }
// train station NEW FORM
export const uploadNewTrainStationFormInfo = (params, config) => { return axios.post(`${base}/admin/train/station/save`, params, config) }
// train station 编辑
export const initTrainStation = (params) => { return axios.get(`${base}/admin/train/station/detail/` + params) }

// train route NEW FORM
export const uploadNewRouteFormInfo = (params, config) => { return axios.post(`${base}/admin/train/route/save`, params, config) }
// train route 编辑
export const initRoute = (params) => { return axios.get(`${base}/admin/train/route/edit?id=` + params) }
// train route NEW FORM
export const uploadNewRouteScheduleFormInfo = (params, config) => { return axios.post(`${base}/admin/train/routeSchedule/save`, params, config) }
// train route schedule编辑
export const initRouteSchedule = (params) => { return axios.get(`${base}/admin/train/routeSchedule/edit?id=` + params) }
export const initRouteScheduleList = (params) => {
  // return axios.get(`${base}/admin/train/routeSchedule/queryRoute`, {params})
  return axios.get(`${base}/admin/train/schedule/queryRoute`)
}
export const onTrainDirectionQueryJson = (params) => { return axios.get(`${base}/admin/train/direction/query-all`, {params}) }

// train direction 列表接口
export const trainDirectionList = (params) => { return axios.get(`${base}/admin/train/direction/query`, {params}) }
// train direction 编辑
export const initDirection = (params) => { return axios.get(`${base}/admin/train/direction/detail/` + params) }
// train direction NEW FORM
export const uploadNewDirectionFormInfo = (params, config) => { return axios.post(`${base}/admin/train/direction/save`, params, config) }

// phone model图片上传
export const uploadPhotosPhotos = (params, config) => { return axios.post(`${base}/admin/shop/electronics/image_upload`, params, config) }
//excel save
export const editExcel = (params,config) => { return axios.post(`${base}/admin/shop/electronics/edit`, params,config) }
